<template>
  <Mapbox :mapOnLoadCB="mapOnLoadCB"></Mapbox>
</template>

<script>
import {ref} from "vue"
import Mapbox from "@/components/common/Mapbox.component.vue"
import MapboxCommonService from "@/service/map/MapboxCommonService"

export default {
  name: "AddCustomSymbolPopper.component",
  components: {Mapbox},
  setup() {

    let mapStore = ref({});
    let mapOnLoadCB = (map) => {
      mapStore.value = map;

      let element = document.createElement('div');
      element.id = "custom-popper-marker";
      MapboxCommonService.addIconWithPopper(map, element)
    };

    return {
      mapOnLoadCB
    }
  }
}
</script>

<style scoped lang="scss">
:deep(#custom-popper-marker) {
  background-image: bgImgPath("washington-monument.jpg");
  background-size: cover;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
}
</style>